﻿using RabbitDownload.WebSite.Pixiv;
using RabbitDownload.WebSite.Pixiv.PixivDay;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RabbitDownload.WebSite.Local.AutoPic
{
    internal class PixivBackgroundRun
    {/// <summary>
     /// 通用辅助启动方法
     /// </summary>
        private void ScannerDayAPIs(string ModeText)
        {
            PixivStaticValue.BlockComic = true;
            PixivStaticValue.ExcludeOpenFlag = true;
            string PixivPath = PixivDayScanner.Start(DateTime.Now.AddDays(-2).ToString("yyyyMMdd"), PixivDayScanner.GetAPI(ModeText), 300, "P站" + ModeText, true);
            new AutoPicHelper().RunCommend("PixivWeek", PixivPath);
        }

        /// <summary>
        /// 扫描每日
        /// </summary>
        public void ScannerDay()
        {
            ScannerDayAPIs("每日");
        }

        /// <summary>
        /// 扫描周榜
        /// </summary>
        public void ScannerWeek()
        {
            ScannerDayAPIs("周榜");
        }

        /// <summary>
        /// 扫描每日男性
        /// </summary>
        public void ScannerDayMale()
        {
            ScannerDayAPIs("每日男性");
        }

        /// <summary>
        /// 扫描每日女性
        /// </summary>
        public void ScannerDayFemale()
        {
            ScannerDayAPIs("每日女性");
        }

        /// <summary>
        /// 扫描每月
        /// </summary>
        public void ScannerMonthly()
        {
            ScannerDayAPIs("月榜");
        }
    }
}